<?php
/**
 * Project: Recipe
 * File: ComponentModel.class.php
 * Author: Xnfy520@gmail.com
 * Date: 12-5-7
 * Time: 上午11:47
 */

class ComponentModel extends RelationModel{

	protected $_validate = array(
		array('name', 'require', '组件名称不能为空', 1, 'regex', 3),
		array('sort', 'number', '排序必须为数字', 1, 'regex', 3),
	);
		protected $_link = array(

			'MenuItem'=>array(

			'mapping_type'=>HAS_MANY,
			'mapping_name'=>'menuitem',
			'class_name'=>'MenuItem',
			'foreign_key'=>'componentid',
			'mapping_fields'=>'componentid',

			),

		);

}